GithubHelp home page GithubHelp logo

keystonejs / keystone-utils Goto Github PK

View Code? Open in Web Editor NEW
56.0 56.0 20.0 131 KB

⚠️ Archived - Legacy Node.js utility library used by KeystoneJS and you!

Home Page: http://keystonejs.com

License: MIT License

JavaScript 100.00%

keystone-utils's People

Contributors

alanshaw avatar armellarcier avatar arthurtalkgoal avatar bladey avatar dcousens avatar drmoriarty avatar ericelliott avatar itzaks avatar jedwatson avatar lovell avatar mxstbr avatar pixtron avatar riyadhalnur avatar sebmck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

keystone-utils's Issues

Using transliteration in slug

Hello!
What do you think about using transliteration during slug generation? There is many CMS plugins (for example cyr2lat in wordpress) which transforms russian (and other cyrillic) post titles into the valid slugs.
In nodejs world there is transliteration.cyr package: https://www.npmjs.org/package/transliteration.cyr

I can make a patch or pull request, but firstly I want to know your position about that.

Best regards, and thanks for that useful tools!
I use keystone in my site :-)

extend function

sorry, i may have over looked. Are there any close or possible function like the extend that i can find from keystone utils like this one.. var object = $.extend({}, object1, object2);
Maybe similar to this one: http://api.jquery.com/jquery.extend/

HtmlToText skipping content in select cases

The item description had special characters like this:

U.S., Excellent Used Collection, 1861-1920. An nearly complete collection neatly mounted on blank pages; highlights include 1861-66 Issues complete less the 5¢ buff & 90¢ blue, the 1867 E. grills complete less the
1¢, the F. grills missing only the 5¢, 15¢ & 24¢ (the 90¢ is repaired but quite attractive), the 1869 Pictorials complete to the 30¢ (plus a mint 1¢and an unused 1¢ reprint #123), the Bank Note
Issues complete less the grills & Special Printings, the 1890 issue complete, and the Columbians & Trans-Miss. to the 50¢. The First Bureaus include the $1 type I unwatermarked and the $1 type I & $2 watermarked, and the 1902 issue
is complete to the $5, while the 20th century Commemoratives are complete including the 1909 Lincoln bluish paper. Naturally the highest catalog items have small faults, but they are nearly all quite unobtrusive, and there are plenty of F-VF
stamps cataloging up to $200 and more;
plus, there are many, many VF-XF little gems scattered throughout. A really outstanding lot for collector or dealer alike. Scott value is about $19,500. Estimate $4,000 - 6,000.

And after using htmlToText, this is what I get:

U.S., Excellent Used Collection, 1861-1920. An nearly complete collection neatly mounted on blank pages; highlights include 1861-66 Issues complete less the 5¢ buff plus, there are many, many VF-XF little gems scattered throughout. A really outstanding lot for collector or dealer alike. Scott value is about $19,500. Estimate $4,000 - 6,000.

All the bold text was skipped. I guess it was because of & and ; forming a combination around the skipped text.

Any solutions to this?

random string with CSPRNG

A CSPRNG random string generator with a CLI would be very useful for things like generating the cookie secret, etc...

Is something like that already available?

The current Math.random() implementation is quite weak, cryptographically speaking, and should not be used for those purposes.

Error installing 0.2.0 on Azure (0.1.13 Works)

Application has thrown an uncaught exception and is terminated:
Error: Cannot find module './build/Release/cld'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (D:\home\site\wwwroot\node_modules\keystone-utils\node_modules\limax\node_modules\cld\index.js:2:12)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)

Tests breaking with new `limax` integration

@lovell - wondering if you're interested in looking at this / commenting

Our tests for this library are currently failing because the conversions have changed, including some that seem like regressions:

AssertionError: "one2-three" must equal "one-2-three"
AssertionError: "the-user-s-guide" must equal "the-users-guide"

... and some I am not qualified to say which version is better:

AssertionError: "ce-diaz-ue" must equal "ce-diaz-u"
AssertionError: "kak-upoitelny-v-rossii-vechera" must equal "kak-upoytelny-v-rossyy-vechera"

Issue deploying unicode-json dependency to Heroku

Keystone-utils was updated to version 0.3.5 yesterday which included some dependency updates to new packages. Installing the new version of keystone-utils worked in the local environment but during the install on Heroku, it kept failing.

   [email protected] postinstall /tmp/build_f9fa35c49b480d66133a4162bad1592c/node_modules/unicode-json
   node install.js

   try to read file /usr/share/unicode/UnicodeData.txt…
   /usr/share/unicode/UnicodeData.txt not found.
   try to read file /usr/share/unicode-data/UnicodeData.txt…
   /usr/share/unicode-data/UnicodeData.txt not found.
   try to read file UnicodeData.txt…
   UnicodeData.txt not found.
   try to download…
   GET http://unicode.org:80/Public/UNIDATA/UnicodeData.txt
   fetching…
   try to read file /usr/share/unicode/UnicodeData.txt…
   /usr/share/unicode/UnicodeData.txt not found.
   try to read file /usr/share/unicode-data/UnicodeData.txt…
   /usr/share/unicode-data/UnicodeData.txt not found.
   try to read file UnicodeData.txt…
   parsing…

   readline.js:73
   terminal = !!output.isTTY;
   ^
   TypeError: Cannot read property 'isTTY' of undefined
   at new Interface (readline.js:73:24)
   at Object.exports.createInterface (readline.js:39:10)
   at /tmp/build_f9fa35c49b480d66133a4162bad1592c/node_modules/unicode-json/install.js:77:25
   at Object.cb [as oncomplete] (fs.js:168:19)
   [email protected] /tmp/build_f9fa35c49b480d66133a4162bad1592c

   npm ERR! Linux 3.13.0-85-generic
   npm ERR! argv "node" "/tmp/build_f9fa35c49b480d66133a4162bad1592c/.heroku/node/bin/npm" "install" "--unsafe-perm" "--userconfig" "/tmp/build_f9fa35c49b480d66133a4162bad1592c/.npmrc"
   npm ERR! node v0.10.32
   npm ERR! npm  v3.8.9
   npm ERR! code ELIFECYCLE

   npm ERR! [email protected] postinstall: `node install.js`
   npm ERR! Exit status 8
   npm ERR!
   npm ERR! Failed at the [email protected] postinstall script 'node install.js'.
   npm ERR! Make sure you have the latest version of node.js and npm installed.
   npm ERR! If you do, this is most likely a problem with the unicode-json package,
   npm ERR! not with npm itself.
   npm ERR! Tell the author that this fails on your system:
   npm ERR!     node install.js
   npm ERR! You can get information on how to open an issue for this project with:
   npm ERR!     npm bugs unicode-json
   npm ERR! Or if that isn't available, you can get their info via:
   npm ERR!     npm owner ls unicode-json
   npm ERR! There is likely additional logging output above.

   npm ERR! Please include the following file with any support request:
   npm ERR!     /tmp/build_f9fa35c49b480d66133a4162bad1592c/npm-debug.log
-----> Build failed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.